package com.healthtop.utils;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by Peter on 2017/2/28.
 */
public class Threads {

    private static final int POOL_SIZE = 5;

    private static ExecutorService es = Executors.newFixedThreadPool(POOL_SIZE);

    public static void submit(Runnable runnable) {

        es.submit(runnable);
    }

    public static void main(String[] args) {
        System.out.println("out");
        Threads.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("fdsfds");
            }
        });
        System.out.println("end");
    }
}
